<?php

declare(strict_types=1);

namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

/**
 * @Constants
 */
class ErrorCode extends AbstractConstants
{
    /**
     * @Message("Server Error！")
     */
    const SERVER_ERROR = 500;

    /**
     * 操作失败
     * @Message("操作失败")
     */
    const BUSINESS_FAIL = 10001;

    /**
     * 操作成功
     * @Message("操作成功")
     */
    const BUSINESS_SUCCESS = 10000;

    /**
     * 令牌失效
     * @Message("令牌失效")
     */
    const TOKEN_INVALID = 40001;

    /**
     * 拒绝访问
     * @Message("拒绝访问")
     */
    const ACCESS_DENIED = 40003;

    /**
     * 验证失败
     * @Message("验证失败")
     */
    const CHECK_FAIL = 40006;
}
